package com.grape.transaction.rabbitmq.controller;

import com.grape.transaction.rabbitmq.service.OrderService;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 描述:OrderController 订单接口
 * @author: myx
 * @date: 2019/6/10
 * Copyright © 2019-grape. All rights reserved.
 */
@RestController
public class OrderController {
    @Autowired
    private AmqpTemplate amqpTemplate;

    @Autowired
    private OrderService orderService;
    /**
     * 下单操作
     * @return
     */
    @GetMapping
    public String addOrder(int isFlag){
        return orderService.addOrder(isFlag);
    }
}
